{{ header }}
<div class="container">
  <ul class="breadcrumb">
    {% for breadcrumb in breadcrumbs %}
      <li class="breadcrumb-item"><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
    {% endfor %}
  </ul>
  {% if success %}
    <div class="alert alert-success alert-dismissible"><i class="fas fa-check-circle"></i> {{ success }}</div>
  {% endif %}
  {% if error_warning %}
    <div class="alert alert-danger alert-dismissible"><i class="fas fa-exclamation-circle"></i> {{ error_warning }}</div>
  {% endif %}
  <div class="row">
    {{ column_left }}
    <div id="content" class="col">{{ content_top }}
      <h1>{{ heading_title }}</h1>
      <div class="table-responsive">
        <table class="table table-bordered table-hover">
          <thead>
            <tr>
              <td class="text-left">{{ column_type }}</td>
              <td class="text-left">{{ column_digits }}</td>
              <td class="text-right">{{ column_expiry }}</td>
              <td></td>
            </tr>
          </thead>
          <tbody>
            {% if cards %}
              {% for card in cards %}
                <tr>
                  <td class="text-left">{{ card.type }}</td>
                  <td class="text-left">{{ card.digits }}</td>
                  <td class="text-right">{{ card.expiry }}</td>
                  <td class="text-right"><a href="{{ delete }} {{ card.card_id }}" class="btn btn-danger">{{ button_delete }}</a></td>
                </tr>
              {% endfor %}
            {% else %}
              <tr>
                <td class="text-center" colspan="4">{{ text_no_results }}</td>
              </tr>
            {% endif %}
          </tbody>
        </table>
      </div>
      <div class="row">
        <div class="col-sm-6 text-left">{{ pagination }}</div>
        <div class="col-sm-6 text-right">{{ results }}</div>
      </div>
      <div class="d-inline-block pt-2 pd-2 w-100">
        <div class="float-left"><a href="{{ back }}" class="btn btn-light">{{ button_back }}</a></div>
        <div class="float-right"><a href="{{ add }}" class="btn btn-primary">{{ button_new_card }}</a></div>
      </div>
      {{ content_bottom }}
    </div>
    {{ column_right }}
  </div>
</div>
{{ footer }} 